<p>Do not enable proxying with <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> until you have <a href="#access">secured your server</a>. Open proxy servers are dangerous both to your
network and to the Internet at large.</p>
</div>
<p>This module implements a proxy/gateway for Apache. It implements
proxying capability for <code>AJP13</code> (Apache JServe Protocol
version 1.3), <code>FTP</code>, <code>CONNECT</code> (for SSL),
<code>HTTP/0.9</code>, <code>HTTP/1.0</code>, and <code>HTTP/1.1</code>.
The module can be configured to connect to other proxy modules for these
and other protocols.</p>
<p>Apache's proxy features are divided into several modules in
addition to <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>:
<p>An Apache proxy server situated in an intranet needs to forward
external requests through the company's firewall (for this, configure
the <code class="directive"><a href="#proxyremote">ProxyRemote</a></code> directive
to forward the respective <var>scheme</var> to the firewall proxy).
However, when it has to
access resources within the intranet, it can bypass the firewall when
accessing hosts. The <code class="directive"><a href="#noproxy">NoProxy</a></code>
directive is useful for specifying which hosts belong to the intranet and
should be accessed directly.</p>
<p>Users within an intranet tend to omit the local domain name from their
WWW requests, thus requesting "http://somehost/" instead of
<code>http://somehost.example.com/</code>. Some commercial proxy servers
let them get away with this and simply serve the request, implying a
configured local domain. When the <code class="directive"><a href="#proxydomain">ProxyDomain</a></code> directive is used and the server is <a href="#proxyrequests">configured for proxy service</a>, Apache can return
a redirect response and send the client to the correct, fully qualified,
server address. This is the preferred method since the user's bookmark
files will then contain fully qualified hosts.</p>
<p>When used inside a <code class="directive"><a href="../mod/core.html#location"><Location></a></code> section, the first argument is omitted and the local
directory is obtained from the <code class="directive"><a href="../mod/core.html#location"><Location></a></code>.</p>
<p>If you require a more flexible reverse-proxy configuration, see the
<code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive with the
<code>http://example.com/mirror/foo/bar</code> to be internally converted
into a proxy request to <code>http://backend.example.com/bar</code>
(the functionality <code>ProxyPass</code> provides here). It also takes care
of redirects the server <code>backend.example.com</code> sends: when
<code>http://backend.example.com/bar</code> is redirected by him to
<code>http://backend.example.com/quux</code> Apache adjusts this to
<code>http://example.com/mirror/foo/quux</code> before forwarding the HTTP
redirect response to the client. Note that the hostname used for
constructing the URL is chosen in respect to the setting of the <code class="directive"><a href="../mod/core.html#usecanonicalname">UseCanonicalName</a></code> directive.</p>
<p>Note that this <code class="directive">ProxyPassReverse</code> directive can
also be used in conjunction with the proxy pass-through feature
(<code>RewriteRule ... [P]</code>) from <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
because it doesn't depend on a corresponding <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive.</p>
<p>When used inside a <code class="directive"><a href="../mod/core.html#location"><Location></a></code> section, the first argument is omitted and the local
directory is obtained from the <code class="directive"><a href="../mod/core.html#location"><Location></a></code>.</p>
<p>This allows or prevents Apache from functioning as a forward proxy
server. (Setting ProxyRequests to <code>Off</code> does not disable use of
the <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive.)</p>
<p>In a typical reverse proxy configuration, this option should be set to
<code>Off</code>.</p>
<p>In order to get the functionality of proxying HTTP or FTP sites, you
need also <code class="module"><a href="../mod/mod_proxy_http.html">mod_proxy_http</a></code> or <code class="module"><a href="../mod/mod_proxy_ftp.html">mod_proxy_ftp</a></code>
(or both) present in the server.</p>
<div class="warning"><h3>Warning</h3>
<p>Do not enable proxying with <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> until you have <a href="#access">secured your server</a>. Open proxy servers are dangerous
both to your network and to the Internet at large.</p>
<p>This directive controls the use of the <code>Via:</code> HTTP
header by the proxy. Its intended use is to control the flow of
proxy requests along a chain of proxy servers. See <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a> (HTTP/1.1), section
14.45 for an explanation of <code>Via:</code> header lines.</p>
<ul>
<li>If set to <code>Off</code>, which is the default, no special processing
is performed. If a request or reply contains a <code>Via:</code> header,
it is passed through unchanged.</li>
<li>If set to <code>On</code>, each request and reply will get a
<code>Via:</code> header line added for the current host.</li>
<li>If set to <code>Full</code>, each generated <code>Via:</code> header
line will additionally have the Apache server version shown as a
<code>Via:</code> comment field.</li>
<li>If set to <code>Block</code>, every proxy request will have all its
<code>Via:</code> header lines removed. No new <code>Via:</code> header will
be generated.</li>
</ul>
</div>
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/mod/mod_proxy.html" title="English"> en </a> |
<a href="../ja/mod/mod_proxy.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p>
</div><div id="footer">
<p class="apache">Copyright 1995-2006 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>